package com.xmall.search.define.constants;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

@Data
@Component
@RefreshScope
public class SearchProperties {

    /**
     * 搜索服务器地址
     */
    @Value("${search.serverUrl}")
    private String serverUrl;

    /**
     * 商品索引名称
     */
    @Value("${search.productIndexName}")
    private String productIndexName;

    /**
     * 商品删除日志Cron
     */
    @Value("${search.productDeleteLogRetryCron}")
    private String productDeleteLogRetryCron = "0 0/5 * * * ?";

    /**
     * 商品更新日志Cron
     */
    @Value("${search.productUpdateLogRetryCron}")
    private String productUpdateLogRetryCron = "0 0/5 * * * ?";
}
